package org.goldfish.demo.multifrontend.messageboard.mobile

import android.app.Application
import android.content.Intent
import androidx.core.content.ContextCompat
import org.goldfish.demo.multifrontend.messageboard.mobile.background.MessageSseService
//import android.content.Intent
//import androidx.core.content.ContextCompat
//import org.goldfish.demo.multifrontend.messageboard.mobile.background.MessageStreamService
import org.goldfish.demo.multifrontend.messageboard.mobile.network.ApiClient

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        appContext = this
        ApiClient.initialize(this)   // Initialize ApiClient
        val intent = Intent(this, MessageSseService::class.java)
        ContextCompat.startForegroundService(this, intent)
    }
    companion object {
        lateinit var appContext: Application
            private set
    }
}

